package com.taxi.driver.module.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.taxi.driver.data.entity.MessageEntity;

import java.io.Serializable;

/**
 * 功能描述：
 */
public class MessageVO implements Serializable {

    public static MessageVO createFrom(MessageEntity entity) {
        if (entity == null) return new MessageVO();
        String strJson = JSON.toJSONString(entity);
        return JSON.parseObject(strJson, MessageVO.class);
    }

    @JSONField(name = "creator")
    public String creator;

    @JSONField(name = "targetName")
    public String targetName;

    @JSONField(name = "targetDriverMobile")
    public String targetDriverMobile;

    @JSONField(name = "readTime")
    public long readTime;

    @JSONField(name = "updateTime")
    public long updateTime;

    @JSONField(name = "pic")
    public String pic;

    @JSONField(name = "companyUuid")
    public String companyUuid;

    @JSONField(name = "type")
    public int type;

    @JSONField(name = "title")
    public String title;

    @JSONField(name = "uuid")
    public String uuid;//消息id

    @JSONField(name = "objectUuid")
    public String objectUuid;

    @JSONField(name = "content")
    public String content;//消息内容

    @JSONField(name = "push")
    public String push;

    @JSONField(name = "updater")
    public String updater;

    @JSONField(name = "sendTime")
    public long sendTime;//消息发送时间

    @JSONField(name = "sendObject")
    public int sendObject;

    @JSONField(name = "createTime")
    public long createTime;

    @JSONField(name = "appid")
    public String appid;

    @JSONField(name = "sendType")
    public int sendType;//1:纯文本，2:链接

    @JSONField(name = "linkUrl")
    public String linkUrl;

    @JSONField(name = "agentUuid")
    public String agentUuid;

    @JSONField(name = "businessType")
    public int businessType;

    @JSONField(name = "status")
    public int status;//1:未读，2:已读，3:删除，4：未读删除，5：已读删除
}
